<%@ page language="java" contentType="text/html; charset=UTF-8"    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Insert title here</title>
	<link rel="stylesheet" type="text/css" href="css/user_css.css">
	<script type="text/javascript">
	function registerCheck(){
		 var id = document.register_form.id;
		 var pwd = document.register_form.password;
		 var name = document.register_form.name;
		 var registerNumber1 = document.register_form.registerNumber1;
		 var registerNumber2 = document.register_form.registerNumber2;
		 
		 if(id.value==""){
			  alert("아이디를 입력해 주세요.");
			  id.focus();
			  return false;
		 }
		 if(pwd.value==""){
			  alert("비밀번호를 입력해 주세요.");
			  pwd.focus();
			  return false;
		 }
		 if(name.value==""){
			  alert("이름을 입력해 주세요.");
			  name.focus();
			  return false;
		 }
		 if(registerNumber1.value==""){
			  alert("주민번호를 입력해 주세요.");
			  registerNumber1.focus();
			  return false;
		 }
		 if(registerNumber1.value.length!=6){
			  alert("주민번호 앞자리 6자리를 입력해 주세요.");
			  registerNumber1.focus();
			  return false;
		 }
		 if(registerNumber2.value==""){
			  alert("주민번호를 입력해 주세요.");
			  registerNumber2.focus();
			  return false;
		 }
		 if(registerNumber2.value.length!=7){
			  alert("주민번호 뒷자리 7자리를 입력해 주세요.");
			  registerNumber1.focus();
			  return false;
		 }
	}
	</script>
</head>
<body>
<div id="wrap">
	<div id="header">
	    <jsp:include page="/menu.jsp"></jsp:include>
	</div>
	
	<div id="centerCon">
	<form action="/${initParam.context_root }/registerMember.do" method="post" name="register_form" onsubmit="return registerCheck()">
    <br><br><br>
    <center>
      <fieldset>
		<legend>회원가입</legend>	
		<table border="0">
		     <tr> 
			 	<td colspan="2" align="center" >&nbsp;&nbsp;    </td> 
			 </tr>
			 <tr>
			  	<td align="center">사용자ID</td>
			  	<td align="left"><input type="text" name="id" maxlength="10" style="width:100px;"></td>
			 </tr>
			 <tr>
			  	<td align="center">Password</td>
			  	<td align="left"><input type="password" name="password" maxlength="10" style="width:100px;"></td>
			 </tr>
			 <tr>
			 	 <td align="center">이       름</td>
			 	 <td align="left"><input type="text" name="name" maxlength="10" style="width:100px;"></td>
			 </tr>
			 <tr>
			 	 <td align="center">주민번호</td>
			     <td align="left">
			  		 <input type="text" name="registerNumber1" maxlength="6" style="width:50px;">-
			 		 <input type="text" name="registerNumber2" maxlength="7" style="width:50px;">
			  	</td>
			 </tr>
			 <tr> 
			 	<td colspan="2" align="center" >&nbsp;&nbsp;    </td> 
			 </tr>
			 <tr>
			  	<td colspan="2" align="center">
			  	    <input type="submit" value="가입">
			  		<input type="reset" value="Reset">
			    </td>
			 </tr>
		</table>
		</fieldset>
	</center> 
    </form>
	</div>
	
	<div id="footer">
		<jsp:include page="/footer.jsp"></jsp:include>   
	</div>
</div>		
    
</body>
</html>
